package com.eduhzy.ttw.teacher.di.module;

import com.jess.arms.di.scope.ActivityScope;

import dagger.Module;
import dagger.Provides;

import com.eduhzy.ttw.teacher.mvp.contract.UpdateClassContract;
import com.eduhzy.ttw.teacher.mvp.model.UpdateClassModel;

/**
 * @author xubo
 * @date 2018-9-26 12:02:28
 */
@Module
public class UpdateClassModule {
    private UpdateClassContract.View view;

    /**
     * 构建UpdateClassModule时,将View的实现类传进来,这样就可以提供View的实现类给presenter
     *
     * @param view
     */
    public UpdateClassModule(UpdateClassContract.View view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    UpdateClassContract.View provideUpdateClassView() {
        return this.view;
    }

    @ActivityScope
    @Provides
    UpdateClassContract.Model provideUpdateClassModel(UpdateClassModel model) {
        return model;
    }
}